{% block sw_settings_product_feature_set_detail %}
<sw-page class="sw-settings-product-feature-sets-detail">

    {% block sw_settings_product_feature_set_detail_header %}
    <template #smart-bar-header>
        <h2>{{ placeholder(productFeatureSet, 'name', $tc('sw-settings-product-feature-sets.detail.textHeadline')) }}</h2>
    </template>
    {% endblock %}

    {% block sw_settings_product_feature_set_detail_language_switch %}
    <template #language-switch>
        <sw-language-switch @on-change="onChangeLanguage" />
    </template>
    {% endblock %}

    {% block sw_settings_product_feature_set_detail_actions %}
    <template #smart-bar-actions>

        {% block sw_settings_product_feature_set_detail_actions_save %}
        <sw-button-process
            v-model:process-success="isSaveSuccessful"
            v-tooltip.bottom="tooltipSave"
            class="sw-settings-currency-detail__save-action"
            :is-loading="isLoading"
            :disabled="isLoading || !acl.can('product_feature_sets.editor') || undefined"
            variant="primary"
            @update:process-success="saveFinish"
            @click.prevent="onSave"
        >
            {{ $tc('sw-settings-product-feature-sets.detail.buttonSave') }}
        </sw-button-process>
        {% endblock %}

    </template>
    {% endblock %}

    {% block sw_settings_product_feature_set_detail_content %}
    <template #content>
        <sw-card-view>
            <template v-if="isLoading">
                <sw-skeleton variant="detail-bold" />
                <sw-skeleton />
            </template>

            <template v-else>
                {% block sw_settings_product_feature_set_detail_content_language_info %}
                <sw-language-info
                    :entity-description="placeholder(productFeatureSet, 'name', $tc('sw-settings-product-feature-sets.detail.textHeadline'))"
                />
                {% endblock %}

                {% block sw_settings_product_feature_set_detail_content_card %}
                <mt-card
                    :title="$tc('sw-settings-product-feature-sets.detail.titleCard')"
                    position-identifier="sw-settings-product-feature-sets-detail"
                >

                    {% block sw_settings_product_feature_set_detail_content_field_name %}

                    <mt-text-field
                        v-model="productFeatureSet.name"
                        class="sw-settings-product-feature-sets-detail__name"
                        validation="required"
                        required
                        :error="productFeatureSetNameError"
                        :disabled="!acl.can('product_feature_sets.editor')"
                        :label="$tc('sw-settings-product-feature-sets.detail.labelName')"
                        :placeholder="placeholder(productFeatureSet, 'name', $tc('sw-settings-product-feature-sets.detail.placeholderName'))"
                    />
                    {% endblock %}

                    {% block sw_settings_product_feature_set_detail_content_field_description %}
                    <mt-textarea
                        v-model="productFeatureSet.description"
                        :label="$tc('sw-settings-product-feature-sets.detail.labelDescription')"
                        class="sw-settings-product-feature-sets-detail__description"
                        :error="productFeatureSetDescriptionError"
                        :disabled="!acl.can('product_feature_sets.editor')"
                        :placeholder="placeholder(productFeatureSet, 'description', $tc('sw-settings-product-feature-sets.detail.placeholderDescription'))"
                    />
                    {% endblock %}

                </mt-card>
                {% endblock %}

                {% block sw_settings_product_feature_set_detail_content_values_card %}
                <sw-settings-product-feature-sets-values-card
                    v-if="productFeatureSet.id"
                    :disabled="!productFeatureSetId || undefined"
                    :allow-edit="acl.can('product_feature_sets.editor') || undefined"
                    class="sw-settings-product-feature-sets-detail__tax-rule-grid"
                    :product-feature-set="productFeatureSet"
                    :is-loading="isLoading"
                    @product-feature-set-rule-save="onSave"
                />
                {% endblock %}
            </template>
        </sw-card-view>
    </template>
    {% endblock %}

</sw-page>
{% endblock %}
